C.NoGravApplied = {
	"prop_physics",
	"prop_physics_multiplayer",
	"prop_ragdoll",
	"gmod_thruster",
	"gmod_turret",
	"gmod_hoverball",
	"gmod_button",
	"gmod_light",
	"gmod_lamp",
	"gmod_cameraprop",
	"prop_vehicle_prisoner_pod",
	"func_physbox",
}

function C.GetGravity( ent )
	
	if( SERVER ) then
		
		return ent.CurrentGravity;
		
	end
	
	if( ent:GetGravity() < 0.01 ) then
		
		return 0;
		
	end
	
	return ent:GetGravity();
	
end

function C.InSun( ent )
	
	local trace = { };
	trace.start = ( ent.EyePos and ent:EyePos() or ent:GetPos() );
	trace.endpos = trace.start + Vector( 0, 0, 1024 );
	trace.filter = ent;
	local tr = util.TraceLine( trace );
	
	if( tr.HitSky or !tr.Hit ) then
		
		return true;
		
	end
	
	return false;
	
end

function C.GetAtmosphereTemp( ent )
	
	local planet = C.InPlanet( ent );
	
	if( planet == 0 ) then
		
		return 0;
		
	end
	
	if( C.InSun( ent ) ) then
		
		return C.MapObjects.Planets[planet].suntemp;
		
	end
	
	return C.MapObjects.Planets[planet].shadetemp;
	
end